﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="HealthMedicineUpdForm.aspx.cs" Inherits="App_Input_HealthMedicineUpdForm"
    Title="会员用药信息维护" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
<!--

function TABLE1_onclick() {

}

// -->
    </script>

    &nbsp;<table width="100%">
        <tr>
            <td>
                <table class="table_border_line">
                    <tr>
                        <td align="left" colspan="6">

                            <script language="javascript">
                                        (new TitleBar('SearchBar', '会员基本信息')).showBar();
                            </script>

                        </td>
                    </tr>
                </table>
                <table class="table_border_line" id="TABLE1" language="javascript" onclick="return TABLE1_onclick()"
                    style="background: ffffff">
                    <tr>
                        <td style="width: 5px; height: 24px"></td>
                        <td align="left" class="list_data_bg_left" style="width: 20%">保健医生编号：</td>
                        <td align="left" style="width: 25%">&nbsp;<asp:Label ID="lblDocId" runat="server"
                            Text=""></asp:Label></td>
                        <td align="left" style="width: 20%"></td>
                        <td align="left" style="width: 25%"></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="width: 5px; height: 24px;">&nbsp;</td>
                        <td style="width: 126px" align="left" class="list_data_bg_left">会员编号：</td>
                        <td style="width: 414px" align="left">&nbsp;<asp:Label ID="lblMemId" runat="server"
                            Text=""></asp:Label></td>
                        <td align="left" style="width: 414px"></td>
                        <td align="left" style="width: 414px"></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="width: 5px; height: 24px">&nbsp;</td>
                        <td class="list_data_bg_left" style="width: 126px">会员姓名：</td>
                        <td style="width: 414px">&nbsp;<asp:Label ID="lblMemName" runat="server" Text=""></asp:Label></td>
                        <td style="width: 414px">&nbsp;会员性别：</td>
                        <td style="width: 414px">&nbsp;<asp:Label ID="lblMemSex" runat="server" Text=""></asp:Label></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="width: 5px; height: 24px"></td>
                        <td class="list_data_bg_left" style="width: 126px">房间编号：</td>
                        <td style="width: 414px">&nbsp;<asp:Label ID="lblRoomId" runat="server" Text=""></asp:Label></td>
                        <td style="width: 414px">&nbsp;联系电话：</td>
                        <td style="width: 414px">&nbsp;<asp:Label ID="lblMemTel" runat="server" Text=""></asp:Label></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="width: 10px"></td>
                        <td colspan="2" align="center"></td>
                        <td colspan="3" align="right">&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table id="tblMain" runat="server" width="100%">
                    <tr>
                        <td align="left">

                            <script language="javascript">
                                        (new TitleBar('SearchBar1', '当前用药信息列表')).showBar();
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="viewSrhRst" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CssClass="GridView_table" DataKeyNames="MemberMedicineId" OnRowCommand="viewSrhRst_RowCommand"
                                OnPageIndexChanging="viewSrhRst_PageIndexChanging" OnRowDataBound="viewSrhRst_RowDataBound"
                                BorderStyle="Solid" BorderWidth="3px" EnableViewState="False">
                                <Columns>
                                    <asp:BoundField HeaderText="药方编号" DataField="MemberMedicineId" >
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="用药类型" DataField="MedicineType">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="开始时间" DataField="BeginDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="false">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="结束时间" DataField="EndDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="false">
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="用药状态" DataField="CancelFlg">
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="药名" DataField="MedicineName">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="途径" DataField="MedicineApproach">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="频次" DataField="MedicineFrequency">
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="数量" DataField="MedicineQuantity">
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="单位" DataField="MedicineUnit">
                                        <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>                                    
                                    <asp:BoundField HeaderText="备注" DataField="Memo">
                                        <HeaderStyle Width="30%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:ButtonField ButtonType="Image" CommandName="Details" HeaderText="停药" ImageUrl="~/images/info.gif">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                                    </asp:ButtonField>
                                </Columns>
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle HorizontalAlign="Right" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table id="tblHistory" runat="server" width="100%" visible = "false">
                    <tr>
                        <td align="left">

                            <script language="javascript">
                                        (new TitleBar('SearchBar1', '历史用药信息列表')).showBar();
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="viewSrhFin" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CssClass="GridView_table" DataKeyNames="MemberMedicineId" OnRowCommand="viewSrhFin_RowCommand"
                                OnPageIndexChanging="viewSrhFin_PageIndexChanging" OnRowDataBound="viewSrhFin_RowDataBound"
                                BorderStyle="Solid" BorderWidth="3px" EnableViewState="False">
                                <Columns>
                                    <asp:BoundField HeaderText="药方编号" DataField="MemberMedicineId">
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="用药类型" DataField="MedicineType">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="开始时间" DataField="BeginDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="false">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="结束时间" DataField="EndDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="false">
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_left" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="用药状态" DataField="CancelFlg">
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="药名" DataField="MedicineName">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="途径" DataField="MedicineApproach">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="频次" DataField="MedicineFrequency">
                                        <HeaderStyle Width="7%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="数量" DataField="MedicineQuantity">
                                        <HeaderStyle Width="6%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="单位" DataField="MedicineUnit">
                                        <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>                                                                        
                                    <asp:BoundField HeaderText="备注" DataField="Memo">
                                        <HeaderStyle Width="33%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle HorizontalAlign="Right" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table id="tblDetail" runat="server" width="100%" visible = "false">
                    <tr>
                        <td align="left">

                            <script language="javascript">
                                        (new TitleBar('SearchBar1', '用药明细信息列表')).showBar();
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="viewSrhDetail" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CssClass="GridView_table" DataKeyNames="RowId" OnPageIndexChanging="viewSrhDetail_PageIndexChanging"
                                BorderStyle="Solid" BorderWidth="3px" EnableViewState="False" visible = "false">
                                <Columns>
                                    <asp:BoundField HeaderText="主键编号" DataField="RowId" Visible="false">
                                        <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_left" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="药名" DataField="MedicineName">
                                        <ItemStyle CssClass="GridView_item_left" />
                                        <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="途径" DataField="MedicineApproach">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="频次" DataField="MedicineFrequency">
                                        <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_left" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="数量" DataField="MedicineQuantity">
                                        <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="单位" DataField="MedicineUnit">
                                        <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                        <ItemStyle CssClass="GridView_item_center" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle HorizontalAlign="Right" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="">
                <div id="detail" runat="server" visible="false">
                    <table id="Table3" runat="server" width="100%">
                        <tr>
                            <td align="left">

                                <script language="javascript">
                                        (new TitleBar('SearchBar1', '新键用药明细')).showBar();
                                </script>

                            </td>
                        </tr>
                        <tr>
                            <td>
                                <!--用药明细录入 -->
                                <table style="width: 100%" class="list_border_blue">
                                    <tr>
                                        <td class="list_title_bg_grayblue_center">药方类型</td>
                                        <td class="list_data_bg_left">
                                            <asp:DropDownList ID="lstMedicineTypeC" runat="server" OnSelectedIndexChanged="lstMedicineTypeC_SelectedIndexChanged"
                                                AutoPostBack="True">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td class="list_title_bg_grayblue_center">生效期间</td>
                                        <td class="list_data_bg_left">
                                            <asp:TextBox ID="txtBeginDate" runat="server" onfocus="new Calendar().show(this);">
                                            </asp:TextBox>
                                            ~
                                            <asp:TextBox ID="txtEndDate" runat="server" Enabled="false" BackColor="Silver" onfocus="new Calendar().show(this);"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="list_title_bg_grayblue_center">备注</td>
                                        <td class="list_data_bg_left">
                                            <asp:TextBox ID="txtMemo" runat="server" Width="99%"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 20%" class="list_title_bg_grayblue_center">用药明细信息</td>
                                        <td style="width: 80%">
                                            <!--用药明细录入 table in -->
                                            <asp:Table ID="tableDyna" runat="server" Width="100%" GridLines="Both" HorizontalAlign="Center"
                                                CssClass="list_border_blue">
                                                <asp:TableRow ID="TableRow1" runat="server" TableSection="TableHeader">
                                                    <asp:TableCell ID="TableCell1" runat="server" CssClass="list_title_bg_grayblue_center">药名</asp:TableCell>
                                                    <asp:TableCell ID="TableCell2" runat="server" CssClass="list_title_bg_grayblue_center">途径</asp:TableCell>
                                                    <asp:TableCell ID="TableCell3" runat="server" CssClass="list_title_bg_grayblue_center">频次</asp:TableCell>
                                                    <asp:TableCell ID="TableCell4" runat="server" CssClass="list_title_bg_grayblue_center">数量</asp:TableCell>
                                                    <asp:TableCell ID="TableCell5" runat="server" CssClass="list_title_bg_grayblue_center">单位</asp:TableCell>
                                                </asp:TableRow>
                                            </asp:Table>
                                            <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="button1" OnClick="btnAdd_Click"
                                                Height="21px" Width="61px" />
                                            <asp:Button ID="btnDel" runat="server" Text="删除" CssClass="button1" OnClick="btnDel_Click"
                                                Height="21px" Width="61px" /></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td align="center" style="">
                <asp:Button ID="btnNew" runat="server" Text="  新 建  " Height="22px" Width="89px"
                    CssClass="button" OnClick="btnNew_Click" Enabled="false" OnClientClick="javascript:return window.confirm('确定要新建立一个药方吗？')" />
                &nbsp; &nbsp;
                <asp:Button ID="btnOk" runat="server" Text="  登 记  " Height="22px" Width="89px" CssClass="button"
                    OnClick="btnOk_Click" Enabled="false" OnClientClick="javascript:return window.confirm('确定要登记该药方吗？')"/>
                &nbsp;&nbsp;
                <asp:Button ID="btnCancel" runat="server" Text="  取 消  " Height="22px" Width="89px"
                    CssClass="button" OnClick="btnCancel_Click" Enabled="false" OnClientClick="javascript:return window.confirm('确定要放弃该药方吗？')" />
                &nbsp;&nbsp;
                <asp:Button ID="btnFinish" runat="server" Text="  停 药  " Height="22px" Width="89px"
                    CssClass="button" OnClick="btnFinish_Click" Enabled="false" OnClientClick="javascript:return window.confirm('确定要停止该药方吗？')"  Visible = "false"/>
                &nbsp;&nbsp;
                <asp:Button ID="btnHistory" runat="server" Text="显示历史记录" Height="22px" Width="89px"
                    CssClass="button" OnClick="btnHistory_Click" />
                &nbsp;&nbsp;                
                <asp:Button ID="btnBack" runat="server" Text="  返 回  " Height="22px" Width="89px"
                    CssClass="button" OnClick="btnBack_Click" /></td>
        </tr>
    </table>
</asp:Content>
